/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package it.polimi.registration.business.security.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author Stefano
 */
@Entity
public class Personalize implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @JoinColumn(referencedColumnName = "ID")
    @ManyToOne(optional = false)
    private Event event;
    
    @Id
    @JoinColumn(referencedColumnName = "email")
    @ManyToOne(optional = false)
    private User username;
    
    private int alarm; //Number of minutes before the event
    
    private String label;

    public User getUsername() {
        return username;
    }

    public void setUsername(User username) {
        this.username = username;
    }

    public Event getEvent() {
        return event;
    }

    public void setEvent(Event event) {
        this.event = event;
    }
    
    public int getAlarm() {
        return alarm;
    }

    public void setAlarm(int alarm) {
        this.alarm = alarm;
    }
    
    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }
    
}
